<extend name="../layout" />

<block name="head">{:L($lang_title)}</block>
<block name="main_content">
    <div class="row-fluid">
        <div class="span3">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                    <h5>{:L('stockout_source')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered table-striped with-check">
                        <tbody>
                            <tr>
                                <th style="width:80px;">ID</th>
                                <td>{$thePaper.source_row.id}</td>
                            </tr>
                            <tr>
                                <th>{:L('subject')}</th>
                                <td>{$thePaper.source_row.subject}</td>
                            </tr>
                            <tr>
                                <th>{:L('create_dateline')}</th>
                                <td>{$thePaper.source_row.dateline_lang}</td>
                            </tr>
                            <tr>
                                <th>{:L('sponsor')}</th>
                                <td>{$thePaper.source_row.saler_id|toTruename}</td>
                            </tr>
                            <tr>
                                <th>{:L('status')}</th>
                                <td>{$thePaper.processes.currentNode.status_text}</td>
                            </tr>
                            <tr>
                                <th>{:L('stock')}</th>
                                <td>{$thePaper.source_row.stock_id|toStockName}</td>
                            </tr>
                            <tr>
                                <th>{:L('memo')}</th>
                                <td>{$thePaper.source_row.memo}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="span9">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                    <h5>{:L('stockout_detail')}</h5>
                    <a href="{:U('index')}" class="label label-info">{:L('go_back')}</a>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered table-striped with-check">
                        <thead>
                            <tr>
                                <th style="width:70px;">{:L('id')}</th>
                                <th>{:L('goods')}</th>
                                <th>{:L('color')}</th>
                                <th>{:L('standard')}</th>
                                <th>{:L('per_price')}</th>
                                <th>{:L('total_price')}</th>
                                <th>{:L('num')}</th>
                                <th>{:L('store_num')}</th>
                            </tr>
                        </thead>
                        <tbody id="stockin_table">
                        <volist name="list" id="t">
                            <tr rowid="{$t.id}">
                                <td>{$t.factory_code_all}</td>
                                <td>{$t.goods_name}</td>
                                <td>{$t.color_name}</td>
                                <td>{$t.standard_name}</td>
                                <td>{$t.per_price}</td>
                                <td>{$t.price}</td>
                                <td>
                            <if condition="$t[num] gt $t[store_num]">
                                <span class="label label-warning" title="库存不足">{$t.num}</span>
                                <else />
                                {$t.num}
                            </if>
                            </td>
                            <td>{$t.store_num}</td>
                            </tr>
                        </volist>
                        </tbody>
                        <tfoot>
                            <tr>
                                <th colspan="5">
                                    <form method="POST" action="">
                                        <input type="hidden" name="hidden_field" />
                                        <button type="submit" class="btn btn-primary">{:L("confirm_stockout")}</button>
                                        <a href="javascript:history.go(-1);" class="btn btn-info">{:L('go_back')}</a>
                                    </form>
                                </th>
                                <td colspan="3">
                                    {:L('total_num')}
                                    <span class="label label-important" id="total_num">{$thePaper.source_row.total_num}</span>
                                    {:L('total_price')}
                                    <span class="label label-info" id="total_num">{$thePaper.source_row.total_price}</span>
                                    {:L('total_price_real')}
                                    <span class="label label-success" id="total_num">{$thePaper.source_row.total_price_real}</span>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</block>